<template>
  <view class="item" @click="clickItem">
    <view class="left">
      <view class="left_value">{{ item.name }}（{{ item.subhead }}）</view>
      <view class="left_con">
        <view class="price_type">免费</view>
        <view class="course_type">音频课</view>
        <view class="num">
          <text>{{ item.playCount }}</text>
          人参与
        </view>
      </view>
    </view>
    <view class="right">
      <image :src="item.coverUrl"></image>
      <view class="icon">
        <image src="@/static/images/audio-icon.png"></image>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: "walkman-card",
  props: {
    item: {
      type: Object,
      value: () => {},
    },
  },
  data() {
    return {};
  },
  methods: {
    clickItem() {
      this.$u.route("/pages/course-detail/course-detail", {
        id: this.item.id,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.item {
  width: 690upx;
  height: 180upx;
  background: #ffffff;
  box-shadow: 0px 4upx 6upx #f0f2f5;
  opacity: 1;
  border-radius: 10upx;
  padding: 30upx;
  margin-bottom: 30upx;
  display: flex;
  justify-content: space-between;
}

.left {
  width: 420upx;
}

.left_value {
  width: 420upx;
  height: 80upx;
  font-size: 28upx;
  font-weight: bold;
  line-height: 40upx;

  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.left_con {
  height: 30upx;
  width: 100%;
  display: flex;
  align-items: center;
  margin-top: 10upx;
}

.price_type {
  font-size: 20upx;
  color: #fff;
  width: 80upx;
  height: 30upx;
  background: #ff9500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10upx;
}

.course_type {
  width: 100upx;
  height: 28upx;
  font-size: 20upx;
  font-weight: 500;
  line-height: 28upx;
  color: #999999;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10upx;
  background: #f2f4f7;
  margin-right: 20upx;
}

.num {
  font-size: 22upx;
  height: 32upx;
  font-weight: 500;
  line-height: 32upx;
  color: #666666;
}

.num text {
  color: #0058a3;
  font-size: 22upx;
}

.right {
  width: 180upx;
  height: 120upx;
  position: relative;
}

.icon {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 76upx;
  height: 32upx;
}
</style>
